{% extends "profilebase.html" %}

{% block sidebar_title %}
{% if profileOwner %}
	{% if currentUser.category == "institute" %}
		<h4>About Us</h4>
	{% else %}
		<h4>About Me</h4>
	{% endif %}
{% else %}
	<h4>About {{ currentUser.abstract_user.user.username }}</h4>
{% endif %}
{% endblock %}

{% block sidebar_content %}
{% if photoPath %}			
	<img border="0" src={{ photoPath }} />
{% endif %}

{% if currentUser.category == "institute" %}
	{% if my_teachers %}
		<h5>Our Teachers:</h5>
		{% for teacher in my_teachers %}
			<label style="font-size:15px;"><a href="/myprofile/{{ teacher.abstract_user.id }}/">{{ teacher.abstract_user }}</a></label><br/>
			<small>Teaches: {{ teacher.teaches }}</small><br/><br/>
		{% endfor %}
	{% endif %}
{% endif %}

{% if currentUser.category == "teacher" %}
	{% if my_institutes %}
			<h5>Work at:</h5>
			{% for institute in my_institutes %}
				<p style="font-size:15px"><a href="/myprofile/{{ institute.abstract_user.id }}/">{{ institute.abstract_user }}</a></p>
			{% endfor %}
	{% endif %}
{% endif %}


{% if profileOwner %}
	{% if currentUser.category == "institute" %}
	
		<h5>About: </h5><p>{{ currentUser.about|default:"Tell us all about your institute" }}</p>
		<h5>Open On: </h5><p>{{ currentUser.open_on|default:"Ahm, is it closed all the time?" }}</p>
		<h5>Open From: </h5><p>{{ currentUser.open_from|default:"Is it open 24hrs aday?" }}</p>
		<h5>Open To: </h5><p>{{ currentUser.open_to|default:"Never closes?"}}</p>
		<h5>Address: </h5><p>{{ currentUser.address|default:"Even if you're located on Mars, you can tell us, we really don't mind" }}</p>
		
	{% else %}
	
		<h5>Date of Birth: </h5><p>{{ currentUser.dob|default:"Not entered yet" }}</p>
		<h5>Gender: </h5><p>{{ currentUser.gender|default:"Are you unsure?" }}</p>
		<h5>Experience: </h5><p>{{ currentUser.experience|default:"Come on, BRAG!" }}</p>
		<h5>Favorite Genre/s: </h5><p>{{ currentUser.favourite_genre|default:"Hmm, you must like something, right?" }}</p>
		<h5>Instrument/s Played: </h5><p>{{ currentUser.instrument_played|default:"Ahm, it is kind of in the definition of a musician to play something. Unless you're a vocalist...'" }}</p>
		<h5>Jamming Style: </h5><p>{{ currentUser.jamming_style|default:"Tell us..." }}</p>
		
		{% if currentUser.category == "teacher" %}
			<h5>Teach: </h5><p>{{ teacher.teaches|default:"Advertise for yourself..." }}</p>
		{% endif %}
			
	{% endif %}
	
	<a href="/editInfo/">Edit My Info</a> - 
	{% if profileOwner %}
		{% if photoPath %}	
			<a href="/myprofile/uploadImage/">Change Photo</a>
		{% else %}
			<a href="/myprofile/uploadImage/">Upload a Photo</a>
		{% endif %}
	{% endif %}
	
{% else %}
	{% if currentUser.category == "institute" %}
		{% if currentUser.about %}
			<h5>About: </h5><p>{{ currentUser.about }}</p>
		{% endif %}
		{% if currentUser.open_on %} 
			<h5>Open On: </h5><p>{{ currentUser.open_on }}</p> 
		{% endif %}
		{% if currentUser.open_from %} 
			<h5>Open From: </h5><p>{{ currentUser.open_from }}</p> 
		{% endif %}
		{% if currentUser.open_to %} 
			<h5>Open To: </h5><p>{{ currentUser.open_to }}</p> 
		{% endif %}
		{% if currentUser.address %} 
			<h5>Address: </h5><p>{{ currentUser.address }}</p> 
		{% endif %}
		
	{% else %}
	
		{% if currentUser.dob %} 
			<h5>Date of Birth: </h5><p>{{ currentUser.dob }}</p> 
		{% endif %}
		{% if currentUser.gender %} 
			<h5>Gender: </h5><p>{{ currentUser.gender }}</p> 
		{% endif %}
		{% if currentUser.experience %} 
			<h5>Experience: </h5><p>{{ currentUser.experience }}</p> 
		{% endif %}
		{% if currentUser.favourite_genre %} 
			<h5>Favourite Genre/s: </h5><p>{{ currentUser.favourite_genre }}</p> 
		{% endif %}
		{% if currentUser.instrument_played %} 
			<h5>Instrument/s Played: </h5><p>{{ currentUser.instrument_played }}</p> 
		{% endif %}
		{% if currentUser.jamming_style %} 
			<h5>Jamming Style: </h5><p>{{ currentUser.jamming_style }}</p> 
		{% endif %}
		
		{% if currentUser.category == "teacher" %}
			{% if currentUser.teaches %}
				<h5>Teach: </h5><p>{{ currentUser.teaches }}</p>
			{% endif %}
		{% endif %}
			
	{% endif %}
	
{% endif %}
{% endblock %}

{% block main_title %}<h1>{{ currentUser.abstract_user.user.username }}'s current schedule</h1>{% endblock %}

{% block main_subtitle %}{% endblock %}

{% block main_content %}
{% if sun %}
	<b>SUNDAY</b><br/><br/>
	{% for slot in sun %}
		{{ slot.title }} 
		{% if slot.location %}
			@ {{ slot.location }}
		{% endif %}
		<br/>{{ slot.start }} - {{ slot.end }}<br/><br/>
	{% endfor %}
<hr />
{% endif %}
{% if mon %}
	<b>MONDAY</b><br/><br/>
	{% for slot in mon %}
		{{ slot.title }} 
		{% if slot.location %}
			@ {{ slot.location }}
		{% endif %}
		<br/>{{ slot.start }} - {{ slot.end }}<br/><br/>
	{% endfor %}
<hr />
{% endif %}
{% if tues %}
	<b>TUESDAY</b><br/><br/>
	{% for slot in tue %}
		{{ slot.title }} 
		{% if slot.location %}
			@ {{ slot.location }}
		{% endif %}
		<br/>{{ slot.start }} - {{ slot.end }}<br/><br/>
	{% endfor %}
<hr />
{% endif %}
{% if wed %}
	<b>WEDNESDAY</b><br/><br/>
	{% for slot in wed %}
		{{ slot.title }} 
		{% if slot.location %}
			@ {{ slot.location }}
		{% endif %}
		<br/>{{ slot.start }} - {{ slot.end }}<br/><br/>
	{% endfor %}
<hr />
{% endif %}
{% if thurs %}
	<b>THURSDAY</b><br/><br/>
	{% for slot in thurs %}
		{{ slot.title }} 
		{% if slot.location %}
			@ {{ slot.location }}
		{% endif %}
		<br/>{{ slot.start }} - {{ slot.end }}<br/><br/>
	{% endfor %}
<hr />
{% endif %}
{% if fri %}
	<b>FRIDAY</b><br/><br/>
	{% for slot in fri %}
		{{ slot.title }} 
		{% if slot.location %}
			@ {{ slot.location }}
		{% endif %}
		<br/>{{ slot.start }} - {{ slot.end }}<br/><br/>
	{% endfor %}
<hr />
{% endif %}
{% if sat %}
	<b>SATURDAY</b><br/><br/>
	{% for slot in sat %}
		{{ slot.title }} 
		{% if slot.location %}
			@ {{ slot.location }}
		{% endif %}
		<br/>{{ slot.start }} - {{ slot.end }}<br/><br/>
	{% endfor %}
<hr />
{% endif %}

{% endblock %}
